import Mock from 'mockjs'

// 图表展示
let List = []
export default {
  getStatisticalData: () => {
    for (let i = 0; i < 7; i++){
      List.push(
        Mock.mock({
          苹果: Mock.Random.float(100, 8000, 0, 0),
          vivo: Mock.Random.float(100, 8000, 0, 0),
          oppo: Mock.Random.float(100, 8000, 0, 0),
          小米: Mock.Random.float(100, 8000, 0, 0),
          三星: Mock.Random.float(100, 8000, 0, 0),
          魅族: Mock.Random.float(100, 8000, 0, 0),
        })
      )
    }
    return {
      code: 200,
      data: {
        // 饼图
        videoData: [
          {
            name: '小米',
            value: 2999
          },
          {
            name: '苹果',
            value: 5999
          }, 
          {
            name: 'vivo',
            value: 3999
          },
          {
            name: 'oppo',
            value: 3499
          },
          {
            name: '三星',
            value: 5999
          },
          {
            name: '魅族',
            value: 1999
          }
        ],
        // 柱状图
        userData: [
          {
            date: '周一',
            new: 5,
            active: 200
          },
          {
            date: '周二',
            new: 10,
            active: 500
          },
          {
            date: '周三',
            new: 12,
            active: 550
          },
          {
            date: '周四',
            new: 60,
            active: 800
          },
          {
            date: '周五',
            new: 20,
            active: 650
          },
          {
            date: '周六',
            new: 36,
            active: 1000
          },
          {
            date: '周日',
            new: 75,
            active: 1300
          }
        ],
        // 折线图
        orderData: {
          date: ['20250618', '20250619', '20250620', '20250621', '20250622', '20250623', '20250624'],
          data: List
        },
        tableData: [
          {
            name: 'oppo',
            todayBuy: 100,
            monthBuy: 300,
            totalBuy: 800
          },
          {
            name: 'vivo',
            todayBuy: 100,
            monthBuy: 300,
            totalBuy: 800
          },
          {
            name: '苹果',
            todayBuy: 100,
            monthBuy: 300,
            totalBuy: 1200
          },
          {
            name: '小米',
            todayBuy: 100,
            monthBuy: 300,
            totalBuy: 800
          },
          {
            name: '三星',
            todayBuy: 100,
            monthBuy: 300,
            totalBuy: 800
          },
          {
            name: '魅族',
            todayBuy: 100,
            monthBuy: 300,
            totalBuy: 800 
          } 
        ]
      }
    }
  }
}